package com.elb.sell.common.vo;

import com.elb.sell.vo.ResultVO;

/**
 * @author HanLiBin
 * @version V1.0
 */
public class ResultVoUtil {
    public static ResultVO success(Object object){
        ResultVO resultVO=new ResultVO();
        resultVO.setData(object);
        resultVO.setMsg("ok");
        resultVO.setCode(0);
        return resultVO;
    }
    public static ResultVO success(){
        return success(null);
    }

    public static ResultVO error(Integer code,String msg){
        ResultVO resultVO=new ResultVO();
        resultVO.setData(msg);
        resultVO.setMsg("error");
        resultVO.setCode(code);
        return resultVO;
    }
}
